#include <stdio.h>

long factorial(long number)
{
    if(number<=1)
        return 1;
    else
        return number*factorial(number-1);
}

long combinator(int n,int m) //n是下面那个 
{
    return factorial(n)/(factorial(m)*factorial(n-m));
}

int main()
{
	int maxn;
	scanf("%d",&maxn);
	for(int n=0;n<maxn;n++)
	{
		for(int i=0;i<=n;i++)
			printf("%d ",combinator(n,i));	
		printf("\n");
	}
}